package com.flca.frw.components.wizzard
{
	import com.flca.frw.events.EventBroker;
	
	import mx.collections.ArrayCollection;
	import mx.containers.VBox;

	public class GenWzrdStepCtrl extends VBox
	{
		private var _pages : ArrayCollection;
		
		public function GenWzrdStepCtrl()
		{
			super();
			
			EventBroker.instance.addEventListener(ActivatePageEvent.EVENT_PAGE_ACTIVATED, hanlePageActivated);
		}
		
		
		private function hanlePageActivated(event:ActivatePageEvent) : void
		{
			view.list.dataProvider = _pages;
		}
		
		public function get pages() : ArrayCollection {
			return _pages;
		}
		public function set pages(value:ArrayCollection) : void 
		{
			_pages = value;
		}

		private function get view() : GenWzrdStepView {
			return this as GenWzrdStepView;
		}

	}
}